gadgetinteger()

Description:

This will create a float gadget in, the specified window, and return itīs handle. Please note that the handle variable must have the type handle: ".gadget" assigned to it.

- A textbox float is a gadget with text and a surrounding border.

- User can type in a integer or whole (without decimals) value.

Syntax:

Required syntax:

 

gadgethandle.gadget = gadgetinteger( windowhandle , x , y , width , height , text$ , place , guidesign , font )

 

Optional syntax:

 

gadgethandle.gadget = gadgetinteger( windowhandle , x , y , width , height , text$ , place , guidesign , font , [defaultnumber] , [min_value] ,  [max_value] , [drag/scroll_enable] , [ drag/scroll_step# ] , [ help$ ] , [ scale ] , [ scalex ] , [ scaley ] , [ scalewidth ] , [ scaleheight ] , [ show ] , [ lock ] )

 

Parameters:

Required parameters

Description

windowhandle A handle to the window where the gadget will appear
x Horizontal position in used window
y Vertical position in used window
width total width of gadget in pixels
height total height of gadget in pixels
text$ A string containing the text dsiplayed in/above/right/below or left for the gadget
place where to place text$:

0: In
1: Above
2: Right
3: Below
4: Left

guidesign a handle to a previously created/loaded guidesign
font the font used to display the gadget
Optional parameters

Description

Default

defaultnumber The default input in the ïnteger gadget 0
min_value Minimum value the user is allowed to type into the float gadget ( 0 = no limit ) 0
max_value Maximum value the user is allowed to type into the float gadget ( 0 = no limit ) 0
drag/scroll_enable A value to enable the user to increase/decrease gadget value while dragging / scrolling with mouse button pressed:

0:  disable drag/scroll; a normal integergadget

1:  enabled with editing

2:  enabled without editing

0
drag/scroll_step# Value to increment/decrement gadget value with, while dragging / scrolling 1.000000
help$ help string containing the help, displayed when user holds the cursor above gadget. None or ""
scale boolean value to set if gadget is resized  along with the window. (no scale = 0 / scale = 1) 0
scalex boolean value to set if a gadgetīs x-pos is scaled, when gadget scaled  (donīt scale = 0 / scale = 1) 1
scaley boolean value to set if a gadgetīs y-pos is scaled, when gadget scaled  (donīt scale = 0 / scale = 1) 1
scalewidth boolean value to set if a gadgetīs width is scaled, when gadget scaled  (donīt scale = 0 / scale = 1) 1
scaleheight boolean value to set if a gadgetīs height is scaled, when gadget scaled  (donīt scale = 0 / scale = 1) 1
show boolean value to show/hide gadget. (hide = 0 / show = 1) 1
lock boolean value to lock/unlock gadget; locked means: user cannot interact with gadget. (unlock = 0 / lock = 1) 0

Returns:

A gadget handle for future gadget-reference

Example: